import VueRouter from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer'
import MemberContainer from './components/tabbar/MemberContainer'
import ShopcarContainer from './components/tabbar/ShopcarContainer'
import SearchContainer from './components/tabbar/SearchContainer'
import NewsList from './components/news/NewsList'
import NewsInfo from './components/news/NewsInfo'

// export default new VueRouter({
//   routes: [
//     {path: '/home',component: HomeContainer},
//     {path: '/member',component: MemberContainer},
//     {path: '/shopcar',component: ShopcarContainer},
//     {path: '/search',component: SearchContainer}
//   ],
//   linkActiveClass: 'mui-active'
//   //默认覆盖路由高亮类，默认的类叫做router-link-active
// })
var router = new VueRouter({
  routes: [
    {path: '/',redirect: '/home'},
    {path: '/home',component: HomeContainer},
    {path: '/member',component: MemberContainer},
    {path: '/shopcar',component: ShopcarContainer},
    {path: '/search',component: SearchContainer},
    {path: '/home/newslist',component: NewsList},
    {path: '/home/newsinfo/:id',component: NewsInfo}
  ],
  linkActiveClass: 'mui-active'
  //默认覆盖路由高亮类，默认的类叫做router-link-active
})

export default router
